<?php
{% include 'header.tpl' %}

// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
?>
<?php foreach($this->items as $i => $item): ?>
	<tr class="row<?php echo $i % 2; ?>">
		<td align="right">
			<?php echo JHtml::_('grid.id', $i, $item->id); ?>
		</td>	
		<td>
			<a href='index.php?option=com_tienda&task={{entity.name|lower}}.edit&id=<?php echo $item->id; ?>'><?php echo $item->id; ?></a>
		</td>		
		{% for field in entity.fields -%}
		{% if 'linkable' in field.list_options -%}
		<td>
       		<a href='index.php?option=com_tienda&task={{entity.name|lower}}.edit&id=<?php echo $item->id; ?>'>		    
       		<?php echo $item->{{ field.name }}; ?>
       		</a>
		</td>       		
   		{% else -%}
	   		{% if 'visible' in field.list_options -%}
	   		<td>
		    	<?php echo $item->{{ field.name }}; ?>
		    </td>
		    {% endif -%}

		{% endif -%}		
		{% endfor -%}
	</tr>
<?php endforeach; ?>
